<?php
    class ExpertsModel extends Model{
    protected $_validate = array(
            array('expert_name','require','名称不能为空',1),
            array('level_id','require','请选择专家级别',1),
            array('title_id','require','请选择职称',1),
            array('mobile','require','手机号码不能为空',1),
            array('mobile','require','手机号码不能为空',1),
           // array('email','require','邮箱不能为空',1)
     );
    protected $_auto = array (
    array('token','gettoken',1,'callback'),
    array('reg_time','getTime',3,'callback'),
        array('time','time',1,'function')
    );
    function gettoken(){
		return session('token');
	}
	function getTime(){
		/* $date=$_POST['enddate'];
		if ($date){
		$dates=explode('-',$date);
		$time=mktime(23,59,59,$dates[1],$dates[2],$dates[0]);
		}else {
			$time=0;
		} */
		return time();
	}
}

?>